package com.bms.entity;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;

/**
 * @author Lan
 */
@Entity
@Table(name = "T_STATISTICS")
public class VisitStatis extends BaseEntity  {

	private static final long serialVersionUID = -4139880538269696141L;
	
	private String hostIP;
	private String link;
	private Long visitCount;
	private String customerIP;
	private Date statisDate;
	private String areaName;//customerIP 所属的区域名称
	
	//按日查询yyyy-MM-dd
	private String beginDate;
	private String endDate;
	
	//查询结果
	private String statisLink;
	private Date minStatisDate;
	private Date maxStatisDate;
	
	public VisitStatis() {
	}

	/**
	 * 发布服务器的IP地址
	 * @author Lan
	 * @return
	 */
	@Column(length = 20)
	public String getHostIP() {
		return hostIP;
	}

	/**
	 * 发布服务器的IP地址
	 * @author Lan
	 * @param hostIP
	 */
	public void setHostIP(String hostIP) {
		this.hostIP = hostIP;
	}

	@Column
	public String getLink() {
		return link;
	}

	public void setLink(String link) {
		this.link = link;
	}

	@Column
	public Long getVisitCount() {
		return visitCount;
	}

	public void setVisitCount(Long visitCount) {
		this.visitCount = visitCount;
	}

	/**
	 * 客户端IP（机顶盒用户）
	 * @return
	 */
	@Column
	public String getCustomerIP() {
		return customerIP;
	}

	public void setCustomerIP(String customerIP) {
		this.customerIP = customerIP;
	}

	/**
	 * 该记录统计的日期
	 * @author Lan
	 * @return
	 */
	@Temporal(TemporalType.DATE)
	public Date getStatisDate() {
		return statisDate;
	}

	public void setStatisDate(Date statisDate) {
		this.statisDate = statisDate;
	}

	/**
	 * @author Lan
	 * @return 客户端IP所属的区域名称
	 */
	@Column(length = 50)
	public String getAreaName() {
		return areaName;
	}

	/**
	 * @author Lan
	 * @param areaName 客户端IP所属的区域名称
	 */
	public void setAreaName(String areaName) {
		this.areaName = areaName;
	}

	@Transient
	public String getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(String beginDate) {
		this.beginDate = beginDate;
	}

	@Transient
	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}

	@Transient
	public String getStatisLink() {
		return statisLink;
	}

	public void setStatisLink(String statisLink) {
		this.statisLink = statisLink;
	}

	@Transient
	public Date getMinStatisDate() {
		return minStatisDate;
	}

	public void setMinStatisDate(Date minStatisDate) {
		this.minStatisDate = minStatisDate;
	}

	@Transient
	public Date getMaxStatisDate() {
		return maxStatisDate;
	}

	public void setMaxStatisDate(Date maxStatisDate) {
		this.maxStatisDate = maxStatisDate;
	}

	@Override
	public String toString() {
		return "HostIP=" + this.hostIP + ", Link=" + this.getLink() + ", VisitCount" + this.visitCount + ", StatisDate=" + this.statisDate + ", AreaName=" + this.areaName;
	}
	
	

}
